/////////////////////////////////////////////
// ObjectARX defined commands

#include "StdAfx.h"
#include "StdArx.h"

#include "WindSpecsPg.h"
#include "WindStartPtPg.h"
#include "WindTypePg.h"


// This is command 'WINDO'
void windo()
{
	// TODO: Implement the command
	CAcModuleResourceOverride resOverride;

	CPropertySheet propSht(IDS_TITLE, acedGetAcadFrame());

	CWindTypePg		windPg;
	CWindSpecsPg	specPg;
	CWindStartPtPg	startPtPg;

	windPg.m_psp.dwFlags	&= ~PSP_HASHELP;
	specPg.m_psp.dwFlags	&= ~PSP_HASHELP;
	startPtPg.m_psp.dwFlags	&= ~PSP_HASHELP;

	propSht.m_psh.dwFlags	&= ~PSH_HASHELP;


	// Since this is being displayed modally instead of
	// modelessly, remove the Apply button, which appears
	// by default on Property Sheets.
	
	propSht.m_psh.dwFlags |= PSH_NOAPPLYNOW;

	propSht.AddPage(&windPg);
	propSht.AddPage(&specPg);
	propSht.AddPage(&startPtPg);


	if(propSht.DoModal() == IDOK )
	{
		windInfo.m_dWindHt = specPg.m_dHeight;
		windInfo.m_dWindWt = specPg.m_dWidth;
		windInfo.m_nCols = specPg.m_nCols;
		windInfo.m_nRows = specPg.m_nRows;

		windInfo.m_dXVal = startPtPg.m_dXVal;
		windInfo.m_dYVal = startPtPg.m_dYVal;

		windInfo.m_nWindType = windPg.m_nWindType;

		switch(windInfo.m_nWindType)
		{
			case 0 : // Rect
				AfxMessageBox("Here is where we would have drawn an Rect window.");
			break;

			case 1 : // Arch
				AfxMessageBox("Here is where we would have drawn an Arch window.");
			break;

			case 2 : // Apex
				AfxMessageBox("Here is where we would have drawn an Apex window.");
			break;
		}
	}
}

